# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-zipp
pkgver=3.5.0
pkgrel=2
pkgdesc="Pathlib-compatible object wrapper for zip files"
url="https://github.com/jaraco/zipp"
arch="noarch"
license="MIT"
depends="py3-jaraco.itertools py3-func-timeout"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/z/zipp/zipp-$pkgver.tar.gz
	add-version-placeholder.patch
	increase-test-timeout.patch
	"
builddir="$srcdir/zipp-$pkgver"

replaces="py-zipp" # Backwards compatibility
provides="py-zipp=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	sed -i "s/%VERSION%/$pkgver/" setup.cfg
}

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="
676d7e9a7fde386b57a213975121aba015461453f0809a97d39d030b06918a4c54ba1cad21877ddf007560941ae285883098d81d5e6f17eb4636379345b4513d  zipp-3.5.0.tar.gz
9101d4ff4e65e3922f875588efb5d17fe36642d8a38d22f269e87ff5da22c088cbfb2c07c0293b739a90d0484d709c73a1bfca955c687d88535a688a0a4b845a  add-version-placeholder.patch
ade3c289effcc7e913220ce8b32a0dac2d8f068f3fdd06e93103da6259dc5bd2c04ebabbc5ed0a356e9c7951fc0e7bca86abc4ed804750fe1498048e653ff8be  increase-test-timeout.patch
"
